/**
    ******************************************************************************
    * @file    bTree.h
    * @author  debian
    * @version V1.0.0
    * @date    2020-01-06
    * @brief   B树
    ******************************************************************************
    * @attention
    *
    *
    ******************************************************************************
    */ 

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __BTREE_H
#define __BTREE_H

#ifdef __cplusplus
    extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/


/** @addtogroup DataStruct_Driver
    * @{
    */

/** @addtogroup bTree
    * @{
    */

typedef int Elemtype;
	
			
#define BTREE_ENTRY(name, type)			\
	struct name 						\
	{									\
		struct type 	**child;		\
		Elemtype 		*key; 			\
		int 			leaf;			\
		int 			num;			\
	}	
			
typedef struct bTree_node
{
	Elemtype data;							//结点数据
	BTREE_ENTRY(, bTree_node) bst;			//B树结点信息
}_bTree_node;
		
		
typedef struct bTree
{
	struct bTree_node *root;				//指向根结点
	int  degree;							//B树的度数
}_bTree;


typedef struct bTree_position
{
	struct bTree_node *x;				//b的结点
	int  	i;							//结点中的第几个元素
}_bTree_position;


/* Exported types ------------------------------------------------------------*/
/** @defgroup 
    * @{
    */ 



/**
    * @}
    */


/* Exported constants --------------------------------------------------------*/

/* Exported macro ------------------------------------------------------------*/

/* Exported functions --------------------------------------------------------*/ 
/* Initialization and de-initialization functions *******************************/
/** @addtogroup bTree_Exported_Functions
    * @{
    */

/** @addtogroup bTree_Exported_Functions_Group1
    * @{
    */
   

/**
    * @}
    */

/* operation functions *******************************************************/
/** @addtogroup bTree_Exported_Functions_Group2
    * @{
    */



/**
    * @}
    */

/**
    * @}
    */ 

/**
    * @}
    */

/**
    * @}
    */


#ifdef __cplusplus
}
#endif

#endif /* __BTREE_H */

/******************* (C) 2020 HOME 深圳龙华 *****END OF FILE****/

